package net.xinqushi.io.input;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

public class DataInputStreamTest {
    public static void main(String[] args) throws IOException {

        ByteArrayInputStream bs = new ByteArrayInputStream("DataOutputStreamTest".getBytes());
        DataInputStream ds = new DataInputStream(bs);

        byte[] bytes = new byte[bs.available()];
        //bs.read(bytes);
        ds.readFully(bytes);

        System.out.println(new String(bytes));
    }
}
